package org.jason.feign.article;

import org.jason.model.article.dtos.ExamineDto;
import org.jason.model.article.pojos.CaArticle;
import org.jason.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("coder-article")
public interface ArticleClient {
    @GetMapping("/article/tobeExamine")
    ResponseResult<List<CaArticle>> getToBeExamineArticle();

    @PostMapping("/article/tobeExamine")
    ResponseResult examine(@RequestBody @Validated ExamineDto dto);
}
